import { defHttp } from "@/utils/http";

// ERP 药品目录API
export const drugInfoApi = {
	// 获得药品目录分页
	drugInfoList: async (params: any) => {
		return await defHttp.get({ url: `/whs/drug-info/page`, params });
	},
	// 获得药品分页
	drugsList: async (params: any) => {
		return await defHttp.get({
			url: `/whs/drugs/page`,
			params
		});
	},
	// 新增药品目录
	drugInfoCreate: async (data: any) => {
		return await defHttp.post({ url: `/whs/drug-info/create`, data });
	},

	// 修改药品目录
	drugInfoUpdate: async (data: any) => {
		return await defHttp.put({ url: `/whs/drug-info/update`, data });
	},

	// 删除药品目录
	drugInfoDelete: async (id: number) => {
		return await defHttp.delete({ url: `/whs/drug-info/delete?id=` + id });
	},
	//药品调价
	rugPriceAdjustCreate: async (data: any) => {
		return await defHttp.post({ url: `/whs/drug-price-adjust/create`, data });
	}
};
